import Home from '@/components/Home'
import Self from '@/components/Self'
import ArticleManage from '@/components/ArticleManage.vue'
import SmallTag from '@/components/SmallTag'
import RootLabel from '@/components/RootLabel'
import ArticleDraft from '@/components/ArticleDraft'
import ArticleEdit from '@/components/ArticleEdit'
import CommentManage from '@/components/CommentManage'
import Subject from '@/components/Subject'
import CommentList from '@/components/CommentList'
import CreateSubject from '@/components/CreateSubject'
import SubjectManage from '@/components/SubjectManage'
import UpdateArticle from '@/components/UpdateArticle.vue'
import Setting from '@/components/Setting.vue'
import DataBase from '@/components/DataBase.vue'
import Login from '@/Login';
import App from '@/App';


// 不作为Main组件的子页面展示的页面单独写，如下
export const loginRouter = {
  path: '/',
  name: 'Login',
  meta: {
    title: 'Login - 登录'
  },
  component: Login
};


const appRouter = [
  {
    path: '/home',
    name: 'Home',
    component: Home
  },
  {
    path: '/self',
    name: 'Self',
    component: Self
  },
  {
    path: '/article-manage',
    name: 'ArticleManage',
    component: ArticleManage
  },
  {
    path: '/small-tag',
    name: 'SmallTag',
    component: SmallTag
  },
  {
    path: '/root-label',
    name: 'RootLabel',
    component: RootLabel
  },
  {
    path: '/draft',
    name: 'ArticleDraft',
    component: ArticleDraft
  },
  {
    path: '/edit',
    name: 'ArticleEdit',
    component: ArticleEdit
  },
  {
    path: '/comment-manage',
    name: 'CommentManage',
    component: CommentManage
  },
  {
    path: '/subject',
    name: 'Subject',
    component: Subject
  },
  {
    path: '/comment-list',
    name: 'CommentList',
    component: CommentList
  },
  {
    path: '/create-subject',
    name: 'CreateSubject',
    component: CreateSubject
  }, {
    path: '/subject-manage',
    name: 'SubjectManage',
    component: SubjectManage
  },
  {
    path: '/update-article',
    name: 'UpdateArticle',
    component: UpdateArticle
  },
  {
    path: '/setting',
    name: 'Setting',
    component: Setting
  },
  {
    path: '/database',
    name: 'DataBase',
    component: DataBase
  }
];


export const AppRoot = {
  path: '/app',
  name: 'App',
  component: App,
  children: appRouter
};

export const routers = [
  loginRouter,
  AppRoot
];

